#Region " WikiPageCollection Class "

''' <summary>
''' Stores an ordered list of WikiPage objects.
''' </summary>
''' <remarks></remarks>
Public Class WikiPageCollection
    Inherits CollectionBase

#Region " CollectionBase Interface "

    ''' <summary>
    ''' Adds the specified WikiPage to the end of the collection.
    ''' </summary>
    ''' <param name="value"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function Add(ByVal value As WikiPage) As Integer
        Return MyBase.List.Add(value)
    End Function

    ''' <summary>
    ''' Gets or sets the WikiPage at the specified index in the collection.
    ''' </summary>
    ''' <param name="index"></param>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Default Public Property Item(ByVal index As Integer) As WikiPage
        Get
            Return CType(MyBase.List.Item(index), WikiPage)
        End Get
        Set(ByVal Value As WikiPage)
            MyBase.List.Item(index) = Value
        End Set
    End Property

    ''' <summary>
    ''' Reverse the order of the WikiPages in the collection.
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub Reverse()
        Dim objValues As ArrayList
        objValues = New ArrayList
        For Each objValue As WikiPage In Me
            objValues.Insert(0, objValue)
        Next objValue
        MyBase.List.Clear()
        For Each objValue As WikiPage In objValues
            MyBase.List.Add(objValue)
        Next objValue
    End Sub

#End Region

End Class

#End Region
